'use strict'

class Child {
  constructor(name) {
    this._name = name
    this._transport = null
  }

  getName() {
    return this._name
  }

  //设置子节点的通道
  setTransport(transport) {
    this._transport = transport
  }

  //回调子节点的接口
  callChild(msgName, msg, cb) {
    this._transport.callRemote(msgName, msg, cb)
  }
}

module.exports = Child
